/// goodsList : [{"orderId":33,"orderCode":null,"goodsId":39,"name":"荤菜","isPackage":0,"packageDetail":null,"price":12.00,"num":1,"money":12.00,"remark":null,"status":0,"isDel":0,"branchId":null,"tenantId":1000,"saasId":1000,"id":11,"createdBy":"5","createdDate":"2022-03-24 16:27:07","updatedBy":"5","updatedDate":"2022-03-24 16:27:07"}]
/// parentOrderCode : null
/// orderCode : null
/// siteId : 4
/// siteName : null
/// elderHumanId : 1
/// elderHumanRoom : "123-12"
/// elderHumanName : "哈哈哈"
/// orderDate : "2022-03-24 00:00:00"
/// useDate : "2022-03-24 00:00:00"
/// useTimeSection : 3
/// useAddr : null
/// useType : 1
/// useNum : 1
/// orderModelType : 1
/// isWeek : 0
/// payment : null
/// discount : null
/// packFee : null
/// discountMoney : null
/// totalMoney : 12.00
/// orderType : null
/// remark : null
/// status : 0
/// isDel : 0
/// branchId : null
/// tenantId : 1000
/// saasId : 1000
/// id : 33
/// createdBy : "5"
/// createdDate : "2022-03-24 16:27:07"
/// updatedBy : "5"
/// updatedDate : "2022-03-24 16:27:07"

class FoodOrderRecordData {
  FoodOrderRecordData({
      this.goodsList, 
      this.parentOrderCode, 
      this.orderCode, 
      this.siteId, 
      this.siteName, 
      this.elderHumanId, 
      this.elderHumanRoom, 
      this.elderHumanName, 
      this.orderDate, 
      this.useDate, 
      this.useTimeSection, 
      this.useAddr, 
      this.useType, 
      this.useNum, 
      this.orderModelType, 
      this.isWeek, 
      this.payment, 
      this.discount, 
      this.packFee, 
      this.discountMoney, 
      this.totalMoney, 
      this.orderType, 
      this.remark, 
      this.status, 
      this.isDel, 
      this.branchId, 
      this.tenantId, 
      this.saasId, 
      this.id, 
      this.createdBy, 
      this.createdDate, 
      this.updatedBy, 
      this.updatedDate,});

  FoodOrderRecordData.fromJson(dynamic json) {
    if (json['goodsList'] != null) {
      goodsList = [];
      json['goodsList'].forEach((v) {
        goodsList?.add(GoodsList.fromJson(v));
      });
    }
    parentOrderCode = json['parentOrderCode'];
    orderCode = json['orderCode'];
    siteId = json['siteId'];
    siteName = json['siteName'];
    elderHumanId = json['elderHumanId'];
    elderHumanRoom = json['elderHumanRoom'];
    elderHumanName = json['elderHumanName'];
    orderDate = json['orderDate'];
    useDate = json['useDate'];
    useTimeSection = json['useTimeSection'];
    useAddr = json['useAddr'];
    useType = json['useType'];
    useNum = json['useNum'];
    orderModelType = json['orderModelType'];
    isWeek = json['isWeek'];
    payment = json['payment'];
    discount = json['discount'];
    packFee = json['packFee'];
    discountMoney = json['discountMoney'];
    totalMoney = json['totalMoney'];
    orderType = json['orderType'];
    remark = json['remark'];
    status = json['status'];
    isDel = json['isDel'];
    branchId = json['branchId'];
    tenantId = json['tenantId'];
    saasId = json['saasId'];
    id = json['id'];
    createdBy = json['createdBy'];
    createdDate = json['createdDate'];
    updatedBy = json['updatedBy'];
    updatedDate = json['updatedDate'];
  }
  List<GoodsList>? goodsList;
  dynamic parentOrderCode;
  dynamic orderCode;
  int? siteId;
  dynamic siteName;
  int? elderHumanId;
  String? elderHumanRoom;
  String? elderHumanName;
  String? orderDate;
  String? useDate;
  int? useTimeSection;
  dynamic useAddr;
  int? useType;
  int? useNum;
  int? orderModelType;
  int? isWeek;
  dynamic payment;
  dynamic discount;
  dynamic packFee;
  dynamic discountMoney;
  double? totalMoney;
  dynamic orderType;
  dynamic remark;
  int? status;
  int? isDel;
  dynamic branchId;
  int? tenantId;
  int? saasId;
  int? id;
  String? createdBy;
  String? createdDate;
  String? updatedBy;
  String? updatedDate;

  String get useTime => useTimeSection==1?'早餐':useTimeSection==2?'午餐':'晚餐';

  Map<String, dynamic> toJson() {
    final map = <String, dynamic>{};
    if (goodsList != null) {
      map['goodsList'] = goodsList?.map((v) => v.toJson()).toList();
    }
    map['parentOrderCode'] = parentOrderCode;
    map['orderCode'] = orderCode;
    map['siteId'] = siteId;
    map['siteName'] = siteName;
    map['elderHumanId'] = elderHumanId;
    map['elderHumanRoom'] = elderHumanRoom;
    map['elderHumanName'] = elderHumanName;
    map['orderDate'] = orderDate;
    map['useDate'] = useDate;
    map['useTimeSection'] = useTimeSection;
    map['useAddr'] = useAddr;
    map['useType'] = useType;
    map['useNum'] = useNum;
    map['orderModelType'] = orderModelType;
    map['isWeek'] = isWeek;
    map['payment'] = payment;
    map['discount'] = discount;
    map['packFee'] = packFee;
    map['discountMoney'] = discountMoney;
    map['totalMoney'] = totalMoney;
    map['orderType'] = orderType;
    map['remark'] = remark;
    map['status'] = status;
    map['isDel'] = isDel;
    map['branchId'] = branchId;
    map['tenantId'] = tenantId;
    map['saasId'] = saasId;
    map['id'] = id;
    map['createdBy'] = createdBy;
    map['createdDate'] = createdDate;
    map['updatedBy'] = updatedBy;
    map['updatedDate'] = updatedDate;
    return map;
  }

}

/// orderId : 33
/// orderCode : null
/// goodsId : 39
/// name : "荤菜"
/// isPackage : 0
/// packageDetail : null
/// price : 12.00
/// num : 1
/// money : 12.00
/// remark : null
/// status : 0
/// isDel : 0
/// branchId : null
/// tenantId : 1000
/// saasId : 1000
/// id : 11
/// createdBy : "5"
/// createdDate : "2022-03-24 16:27:07"
/// updatedBy : "5"
/// updatedDate : "2022-03-24 16:27:07"

class GoodsList {
  GoodsList({
      this.orderId, 
      this.orderCode, 
      this.goodsId, 
      this.name, 
      this.isPackage, 
      this.packageDetail, 
      this.price, 
      this.number,
      this.money, 
      this.remark, 
      this.status, 
      this.isDel, 
      this.branchId, 
      this.tenantId, 
      this.saasId, 
      this.id, 
      this.createdBy, 
      this.createdDate, 
      this.updatedBy, 
      this.updatedDate,this.imgAttachId});

  GoodsList.fromJson(dynamic json) {
    orderId = json['orderId'];
    orderCode = json['orderCode'];
    goodsId = json['goodsId'];
    name = json['name'];
    isPackage = json['isPackage'];
    packageDetail = json['packageDetail'];
    price = json['price'];
    number = json['num'];
    money = json['money'];
    remark = json['remark'];
    status = json['status'];
    isDel = json['isDel'];
    branchId = json['branchId'];
    tenantId = json['tenantId'];
    saasId = json['saasId'];
    id = json['id'];
    createdBy = json['createdBy'];
    createdDate = json['createdDate'];
    updatedBy = json['updatedBy'];
    updatedDate = json['updatedDate'];
    imgAttachId = json['imgAttachId'];
  }
  int? orderId;
  dynamic orderCode;
  int? goodsId;
  String? name;
  int? isPackage;
  dynamic packageDetail;
  num? price;
  int? number;
  num? money;
  dynamic remark;
  int? status;
  int? isDel;
  dynamic branchId;
  int? tenantId;
  int? saasId;
  int? id;
  String? createdBy;
  String? createdDate;
  String? updatedBy;
  String? updatedDate;
  int? imgAttachId;

  Map<String, dynamic> toJson() {
    final map = <String, dynamic>{};
    map['orderId'] = orderId;
    map['orderCode'] = orderCode;
    map['goodsId'] = goodsId;
    map['name'] = name;
    map['isPackage'] = isPackage;
    map['packageDetail'] = packageDetail;
    map['price'] = price;
    map['num'] = number;
    map['money'] = money;
    map['remark'] = remark;
    map['status'] = status;
    map['isDel'] = isDel;
    map['branchId'] = branchId;
    map['tenantId'] = tenantId;
    map['saasId'] = saasId;
    map['id'] = id;
    map['createdBy'] = createdBy;
    map['createdDate'] = createdDate;
    map['updatedBy'] = updatedBy;
    map['updatedDate'] = updatedDate;
    map['imgAttachId'] = imgAttachId;
    return map;
  }

}